<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:set name="date_type" value="%{@com.japp.tools.common.SelectVal@getDataToDateType(en.en_type)}"></s:set>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户更新</title>
<s:include value="/app_common/common.jsp"></s:include>
<!-- 表单验证start -->
<script src="<s:property value='webctx'/>/libs/js/form/validationRule.js" type="text/javascript"></script>
<script src="<s:property value='webctx'/>/libs/js/form/validation.js" type="text/javascript"></script>
<script src="<s:property value='webctx'/>/jsp/plan/engagein/engagein.js" type="text/javascript"></script>
<!-- 表单验证end -->
<!-- 日期选择框start -->
<script type="text/javascript" src="<s:property value='webctx'/>/libs/js/form/datePicker/WdatePicker.js"></script>
<!-- 日期选择框end -->
<style type="text/css">
	input[readonly="readonly"]{
		color: red;
		font-weight:bold;
		cursor: pointer;
	}
</style>
</head>
<body>
	<div style="text-align: center;font-weight: bold;">经营预算计划<s:property value="en.en_id==0?'新增':'修改'"/>(<s:property value="date_type"/>)</div>
		<form name="form2" id="form2" method="post" target="frmright">
		<s:hidden name="en.en_type"></s:hidden>
			<s:if test="en.en_id!=0">
				<%--所属人编码 --%>
				<s:hidden name="en.en_submit_ucode" id="en_submit_ucode"></s:hidden>
				<%--所属人名称 --%>
				<s:hidden name="en.en_submit_uname" id="en_submit_uname"></s:hidden>
				<%--所属分部--%>
				<s:hidden name="en.en_submit_dpcode" id="en_submit_dpcode"></s:hidden>
				<%--所属分部--%>
				<s:hidden name="en.en_submit_dpid" id="en_submit_dpid"></s:hidden>
				<%--所属分部名称--%>
				<s:hidden name="en.en_submit_dpname" id="en_submit_dpname"></s:hidden>
				<%--所属分部名称--%>
				<s:hidden name="en.en_power" id="en_power"></s:hidden>
			</s:if>
			<s:else>
				<%--所属人编码 --%>
				<s:hidden name="en.en_submit_ucode" id="en_submit_ucode" value="%{#session.u_code}"></s:hidden>
				<%--所属人名称 --%>
				<s:hidden name="en.en_submit_uname" id="en_submit_uname" value="%{#session.u_name}"></s:hidden>
				<%--所属分部编码--%>
				<s:hidden name="en.en_submit_dpcode" id="en_submit_dpcode" value="%{#session.userltdcode}"></s:hidden>
				<%--所属分部ID--%>
				<s:hidden name="en.en_submit_dpid" id="en_submit_dpid" value="%{#session.userltd}"></s:hidden>
				<%--所属分部名称--%>
				<s:hidden name="en.en_submit_dpname" id="en_submit_dpname" value="%{#session.userltdname}"></s:hidden>
				<%--所属用户级别--%>
				<s:hidden name="en.en_power" value="%{#session.u_power}"></s:hidden>
			</s:else>
			<s:hidden name="en.en_id" id="en_id"></s:hidden>
			<table class="tableStyle" style="line-height: 30px">
				<tr>
					<th colspan="2" width="35%">收入项目</th>
					<th width="25%">计划金额(万元)</th>
					<th width="20%">利润实现项目（万元）</th>
					<th width="20%">占营业利润比（%）</th>
				</tr>
				<tr>
					<td colspan="2">客户权益:</td>
					<td><input type="text" name="en.en_khqy"
						value="<s:property value='en.en_khqy'/>" id="3"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">可用资金:</td>
					<td><input type="text" name="en.en_kyzj"
						value="<s:property value='en.en_kyzj'/>" id="4"
						class="validate[custom[onlyNumberWide]]" maxlength="20">
					</td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">财务利息净收入:</td>
					<td><input type="text" name="en.en_cwlxjsr"
						value="<s:property value='en.en_cwlxjsr'/>" id="5"
						readonly="readonly" disabled="disabled" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20">
					</td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">交易额:</td>
					<td><input type="text" name="en.en_jye"
						value="<s:property value='en.en_jye'/>" id="6"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">手续费收入:</td>
					<td><input type="text" name="en.en_sxfsr"
						value="<s:property value='en.en_sxfsr'/>" id="7"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">减免及返还净收入 :</td>
					<td><input type="text" name="en.en_jmfhjsr"
						value="<s:property value='en.en_jmfhjsr'/>" id="8"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">佣金净收入 :</td>
					<td><input type="text" name="en.en_yjjsr"
						value="<s:property value='en.en_yjjsr'/>" id="9"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">其他 :</td>
					<td><input type="text" name="en.en_srother"
						value="<s:property value='en.en_srother'/>" id="10"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">收入计划合计 :</td>
					<td><input type="text" name="en.en_sum_srjh"
						value="<s:property value='en.en_sum_srjh'/>" id="11" onselect="return false;"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<%--支出项目 开始 --%>
				<tr>
					<th colspan="2">支出项目</th>
					<th>计划金额(万元)</th>
					<th>占手续费收入比（%）</th>
					<th>占营业费用比（%）</th>
				</tr>
				<tr>
					<td rowspan="4">人工费用</td>
					<td>职工工资</td>
					<td><input type="text" name="en.en_zggz"
						value="<s:property value='en.en_zggz'/>" id="13"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>职工绩效提奖 :</td>
					<td><input type="text" name="en.en_zgjx"
						value="<s:property value='en.en_zgjx'/>" id="14"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>职工奖金 :</td>
					<td><input type="text" name="en.en_zgjj"
						value="<s:property value='en.en_zgjj'/>" id="15"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>合计 :</td>
					<td><input type="text" name="en.en_sum_zg"
						value="<s:property value='en.en_sum_zg'/>" id="16"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">职工福利费 :</td>
					<td><input type="text" name="en.en_fl"
						value="<s:property value='en.en_fl'/>" id="17"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">工会经费 :</td>
					<td><input type="text" name="en.en_sum_jf"
						value="<s:property value='en.en_sum_jf'/>" id="18"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">职工教育经费 :</td>
					<td><input type="text" name="en.en_sum_jyjf"
						value="<s:property value='en.en_sum_jyjf'/>" id="19"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">社会保险费 :</td>
					<td><input type="text" name="en.en_shbx"
						value="<s:property value='en.en_shbx'/>" id="20"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">劳动保护费 :</td>
					<td><input type="text" name="en.en_ldbh"
						value="<s:property value='en.en_ldbh'/>" id="21"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">业务招待费 :</td>
					<td><input type="text" name="en.en_ywzd"
						value="<s:property value='en.en_ywzd'/>" id="22"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">通讯费 :</td>
					<td><input type="text" name="en.en_txf"
						value="<s:property value='en.en_txf'/>" id="23"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">差旅费 :</td>
					<td><input type="text" name="en.en_clf"
						value="<s:property value='en.en_clf'/>" id="24"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td rowspan="4">办公费</td>
					<td>日常办公费:</td>
					<td><input type="text" name="en.en_rcbg"
						value="<s:property value='en.en_rcbg'/>" id="25"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>专项办公费 :</td>
					<td><input type="text" name="en.en_zxbgf"
						value="<s:property value='en.en_zxbgf'/>" id="26"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>邮电费 :</td>
					<td><input type="text" name="en.en_ydf"
						value="<s:property value='en.en_ydf'/>" id="27"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>合计 :</td>
					<td><input type="text" name="en.en_sum_bg"
						value="<s:property value='en.en_sum_bg'/>" id="28"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">交通费 :</td>
					<td><input type="text" name="en.en_jtf"
						value="<s:property value='en.en_jtf'/>" id="29"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">会议费 :</td>
					<td><input type="text" name="en.en_hyf"
						value="<s:property value='en.en_hyf'/>" id="30"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">租赁费 :</td>
					<td><input type="text" name="en.en_zpf"
						value="<s:property value='en.en_zpf'/>" id="31"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td rowspan="3">物业水电费</td>
					<td>物业管理费 :</td>
					<td><input type="text" name="en.en_wygl"
						value="<s:property value='en.en_wygl'/>" id="32"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>水电费 :</td>
					<td><input type="text" name="en.en_sdf"
						value="<s:property value='en.en_sdf'/>" id="33"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>合计:</td>
					<td><input type="text" name="en.en_sum_wy"
						value="<s:property value='en.en_sum_wy'/>" id="34"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">折旧费 :</td>
					<td><input type="text" name="en.en_zjf"
						value="<s:property value='en.en_zjf'/>" id="35"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">修理费 :</td>
					<td><input type="text" name="en.en_xlf"
						value="<s:property value='en.en_xlf'/>" id="36"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">无形资产摊销 :</td>
					<td><input type="text" name="en.en_wxzc"
						value="<s:property value='en.en_wxzc'/>" id="37"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">非社会保险 :</td>
					<td><input type="text" name="en.en_fshbx"
						value="<s:property value='en.en_fshbx'/>" id="38"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">信息化费用 :</td>
					<td><input type="text" name="en.en_xxhf"
						value="<s:property value='en.en_xxhf'/>" id="39"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td rowspan="3">住房公积金及租房补 :</td>
					<td>住房公积金:</td>
					<td><input type="text" name="en.en_zfgjj"
						value="<s:property value='en.en_zfgjj'/>" id="40"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>租房补贴 :</td>
					<td><input type="text" name="en.en_zfbt"
						value="<s:property value='en.en_zfbt'/>" id="41"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td>合计 :</td>
					<td><input type="text" name="en.en_sum_zfgjjzfbt"
						value="<s:property value='en.en_sum_zfgjjzfbt'/>" id="42"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">会员费 :</td>
					<td><input type="text" name="en.en_vip"
						value="<s:property value='en.en_vip'/>" id="43"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">其他 :</td>
					<td><input type="text" name="en.en_zcother"
						value="<s:property value='en.en_zcother'/>" id="44"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<%-- 合计总结开始 --%>
				<tr>
					<td colspan="2">管理费用计划小计 :</td>
					<td><input type="text" name="en.en_sum_glfy"
						value="<s:property value='en.en_sum_glfy'/>" id="45"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">主营业务税金及附加:</td>
					<td><input type="text" name="en.en_sum_yys"
						value="<s:property value='en.en_sum_yys'/>" id="46"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">客户风险准备金 :</td>
					<td><input type="text" name="en.en_sum_khfx"
						value="<s:property value='en.en_sum_khfx'/>" id="47"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">营业费用计划合计 :</td>
					<td><input type="text" name="en.en_plan_yyf"
						value="<s:property value='en.en_plan_yyf'/>" id="48"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">营业利润计划合计 :</td>
					<td><input type="text" name="en.en_plan_lr"
						value="<s:property value='en.en_plan_lr'/>" id="49"
						readonly="readonly" disabled="disabled" class="validate[custom[onlyNumberWide]]"
						maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">可控费用计划合计 :</td>
					<td><input type="text" name="en.en_plan_kkfy"
						value="<s:property value='en.en_plan_kkfy'/>" id="50"
						readonly="readonly" disabled="disabled"
						class="validate[custom[onlyNumberWide]]" maxlength="20"></td>
					<td class="lr"></td>
					<td class="bl"></td>
				</tr>
				<tr>
					<td colspan="2">计划提交时间:</td>
					<td colspan="3">
						<s:if test="en.en_type==1">
							<input name="obj_date" type="text" maxDate="%y-%M-{%d+1}" dateFmt="yyyy-MM-dd"  value="<s:property value='en.en_submit_date'/>" class="date validate[required]" style="cursor: pointer;" >
						</s:if>
						<s:elseif test="en.en_type==2">
							<input name="obj_date" type="text" maxDate="<s:property value='@com.japp.tools.common.Common@checkDateByType(2)'/>" dateFmt="yyyy-MM-dd" isShowWeek="true" value="<s:property value='en.en_submit_date'/>" class="date validate[required]" style="cursor: pointer;" >
						</s:elseif>
						<s:elseif test="en.en_type==3">
							<input name="obj_date" type="text" maxDate="<s:property value='@com.japp.tools.common.Common@checkDateByType(3)'/>" dateFmt="yyyy-MM" value="<s:property value='en.en_submit_date'/>" class="date validate[required]" style="cursor: pointer;" >
						</s:elseif>
						<s:elseif test="en.en_type==4">
							<div style="float:left;"><input name="obj_date"type="text" maxDate="<s:property value='@com.japp.tools.common.Common@checkDateByType(7)'/>" dateFmt="yyyy" value="<s:property value='en.en_submit_date'/>" class="date validate[required]" style="cursor: pointer;" ></div>
							<div style="float:left;"><select name="obj_cdate" class="validate[required]" selectedValue="<s:property value='r.ei_dpid'/>" data='<s:property value='@com.japp.tools.common.Common@checkDateByType(4)'/>'></select></div>
						</s:elseif>
						<s:elseif test="en.en_type==5">
							<div style="float:left;"><input name="obj_date" type="text" maxDate="<s:property value='@com.japp.tools.common.Common@checkDateByType(7)'/>" dateFmt="yyyy" value="<s:property value='en.en_submit_date'/>" class="date validate[required]" style="cursor: pointer;" ></div>
							<div style="float:left;"><select name="obj_cdate" class="validate[required]" selectedValue="<s:property value='r.ei_dpid'/>" data='<s:property value='@com.japp.tools.common.Common@checkDateByType(5)'/>'></select></div>
						</s:elseif>
						<s:elseif test="en.en_type==6">
							<input name="obj_date" type="text" maxDate="<s:property value='@com.japp.tools.common.Common@checkDateByType(6)'/>" dateFmt="yyyy" value="<s:property value='en.en_submit_date'/>" class="date validate[required]" style="cursor: pointer;" >
						</s:elseif>
					</td>
				</tr>
				<tr>
					<td colspan="5" align="center">
					<input type="button" onclick="back()" value="返回" />&nbsp;&nbsp; 
					<input type="button" id="btn1" onclick="checkSubmit()" value="提交" />
				</td>
				</tr>
			</table>
		</form>
</body>
<script type="text/javascript">
	var status = "<s:property value='en.en_id' />";
	function checkSubmit() {
		var actionUrl;
		var valid = $("#form2").validationEngine({returnIsValid: true});
		if(!valid){
			return false;
		}
		if (status == "0") {
			actionUrl = webctx + "/plan/en_insertEngageInById.action";
		} else {
			actionUrl = webctx + "/plan/en_updateEngageInById.action";
		}
		var actionData = $("#form2").serialize();
		showProgressBar();
		$.ajax({
			url : actionUrl,
			data : actionData,
			type : "post",
			cache : false,
			dataType : 'text',
			success : function(data) {
				if (data != 0) {
					alert('操作成功!');
					if (status == 0) {
						window.parent.frmrightChild.location = webctx + "/plan/en_queryEngageIn.action?en.en_type=<s:property value='en.en_type'/>";
					}
				} else {
					alert('操作失败!');
				}
				closeProgress();
			}
		});
	}
	function back() {
		top.Dialog.confirm("确认返回？", function() {
			showProgressBar();
			window.parent.frmrightChild.location = webctx + "/plan/en_queryEngageIn.action?en.en_type=<s:property value='en.en_type'/>";
		});

	}
	var dateFun = {
			methods:function(obj){
			}
	};
</script>
</html>